<%--
  Created by IntelliJ IDEA.
  User: zzz
  Date: 2020/2/7
  Time: 20:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
</head>
<body>
<div class="zuo fl">
    <h3>
        <a href="#"><img src="${APP_PATH}/portal/img/tx.png"/></a>
        <div><p style="width: 150px; margin: 0 auto;" class="clearfix"><span style="font-size:12px; margin-right: 5px;" class="fl">[${sessionScope.user.unick}]</span><span style="font-size:12px;" class="fr" onclick="toExit()">[退出登录]</span></p></div>
    </h3>
    <div>
        <h4>我的交易</h4>
        <ul>
            <li><a href="${APP_PATH}/toTrolley">我的购物车</a></li>
            <li id="order"><a href="${APP_PATH}/toMyOrder">我的订单</a></li>
        </ul>
        <h4>个人中心</h4>
        <ul>
            <li id="user1"><a href="${APP_PATH}/toUser">我的中心</a></li>
            <li id="address"><a href="${APP_PATH}/toAddress">地址管理</a></li>
        </ul>
        <h4>账户管理</h4>
        <ul>
            <li id="info"><a href="${APP_PATH}/toUpdateUser">个人信息</a></li>
            <li id="pass"><a href="${APP_PATH}/toUpdatePass">修改密码</a></li>
        </ul>
    </div>
</div>
</body>
</html>
<script src="${APP_PATH}/portal/js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script>
    $(function () {
        var pathname = window.location.pathname;
        if(pathname == '/FurnitureMall/toUser'){
            $("#user1").addClass("on");
        }else if(pathname == '/FurnitureMall/toAddress'){
            $("#address").addClass("on");
        }else if(pathname == '/FurnitureMall/toMyOrder'){
            $("#order").addClass("on");
        }else if(pathname == '/FurnitureMall/toUpdateUser'){
            $("#info").addClass("on");
        }else if(pathname == '/FurnitureMall/toPass'){
            $("#pass").addClass("on");
        }
    });

    function toExit() {
        window.location.href='${APP_PATH}/user/exit';
    }
</script>